<?php

namespace App\Exceptions;

use App\Traits\Json;
use Illuminate\Http\JsonResponse;

class ApiException extends \Exception
{
    use Json;

    protected $message;
    public function __construct($message, $replace = [], $code = 0, \Throwable $previous = null)
    {

        parent::__construct($message, $code, $previous);
    }
    public function render()
    {
        return $this->sendApiError($this->message);
    }
}
